#ifndef __COMPLEX__
#define __COMPLEX__
#include <iostream>
#include <string>
#include <typeinfo>
#include <sstream>
using namespace std;


class Complex
{
    public:
        Complex():real(0.0f),imag(0.0f){};
        //~Complex();
        Complex(const Complex& _other):real(_other.real),imag(_other.imag){};
        Complex(float _real,float _imag):real(_real),imag(_imag){};

        float       Getimag() { return imag; }
        float       Getreal(){return imag;};
        void        Setimag(float _val) { imag = _val;}


        Complex     operator+(const Complex& _other);
        Complex&    operator+=(const Complex& _other);
        Complex     operator-(const Complex& _other);
        Complex&    operator-=(const Complex& _other);
        Complex     operator*(const Complex& _other);
        Complex&    operator*=(const Complex& _other);

        Complex     operator /(const Complex& _other);
        Complex&    operator =(const Complex& _other);
        bool        operator ==(const Complex& _other);

        Complex     getconjugate();
        Complex     getreciprocal();
        float       getmodulus();
        void        setdata(float _real,float _imag);

        float       getimaginary();

        friend  ostream&      operator<< (ostream& os,const Complex& _this);
        friend  istream&      operator>> (istream& is,Complex& _this);



    private:
        float real;
        float imag;
};


#endif // __Complex__
